﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace IULoggerDemo
{
    public partial class FormMain : Form
    {
        private IULibrary.IULogger _logger=new IULibrary.IULogger();
        public FormMain()
        {
            InitializeComponent();
        }

        private async void btnInfo_Click(object sender, EventArgs e)
        {
            await _logger.InfoAsync("异步记录1条 普通 信息");
            MessageBox.Show("异步记录1条 普通 信息");
        }

        private async void btnWarning_Click(object sender, EventArgs e)
        {
            await _logger.WarningAsync("异步记录1条 警告 信息");
            MessageBox.Show("异步记录1条 警告 信息");
        }

        private async void btnError_Click(object sender, EventArgs e)
        {
            await _logger.ErrorAsync("异步记录1条 错误 信息");
            MessageBox.Show("异步记录1条 错误 信息");
        }

        private async void btnFatal_Click(object sender, EventArgs e)
        {
            await _logger.FatalAsync("异步记录1条 致命错误 信息");
            MessageBox.Show("异步记录1条 致命错误 信息");
        }
    }
}
